import Vue from 'vue'
import Vuex from 'vuex'
import user from './model/user'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        count: 1,
        netWork: true,
        token: '123'
    },
    mutations: {
        loginSuccess (state, payload) {
            state.token = payload
        },
        changeNetwork (state, payload) {
            state.netWork = payload
        }
    },
    actions: {},
    modules: {
        user
    }
})
